<Query Kind="Statements">
  <NuGetReference>SharpSvn</NuGetReference>
  <Namespace>SharpSvn</Namespace>
  <Namespace>System.Net</Namespace>
</Query>

string _remote = "https://vc2000/svn/Test";
string _local = @"C:\Users\zeros\Downloads\2025年6月12日项目5";

using SvnClient _client = new SvnClient();
NetworkCredential _credential = new NetworkCredential("Administrator", "sicont_server");
_client.Authentication.Clear();
_client.Authentication.DefaultCredentials = _credential;
_client.Authentication.SslServerTrustHandlers += (sender, e) =>
{
    e.AcceptedFailures = e.Failures;
    e.Save = true;
};

// Note：测试子文件夹 Exclude，父文件夹 = Infinity 时的 Update 结果

SvnCheckOutArgs _args = new SvnCheckOutArgs() {Depth = SvnDepth.Empty};
_client.CheckOut(new SvnUriTarget(_remote), _local, _args);

_client.Update(_local, new SvnUpdateArgs() { Depth = SvnDepth.Infinity, KeepDepth = true });
_client.Update(Path.Combine(_local, "2025_客户1_项目A"), new SvnUpdateArgs() { Depth = SvnDepth.Exclude, UpdateParents = true, KeepDepth = true });


// 读取本地的工作副本的状态
_client.GetInfo(new SvnPathTarget(_local), new SvnInfoArgs() { Depth = SvnDepth.Infinity }, out var _info);
_info.Dump();